Default Next Meetup #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Default Next Meetup | |
| on: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| actions: write | |
| id-token: write | |
| jobs: | |
| default-next-meetup: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Reset Next Meetup section to default | |
| run: | | |
| cat > src/app/components/meetup/meetup.component.html <<'EOF' | |
| <section id="next-meetup" class="bg-(--surface) px-4"> | |
| <div class="mx-auto flex max-w-5xl flex-col items-center gap-10 md:flex-row-reverse"> | |
| <div class="w-full md:w-1/2"> | |
| <img | |
| ngSrc="/images/homepage/DefaultNextMeetup.jpg" | |
| alt="Next Meetup" | |
| width="1440" | |
| height="1440" | |
| class="w-full rounded-(--radius) object-cover shadow-lg" | |
| /> | |
| </div> | |
| <div class="flex w-full flex-col items-center gap-4 text-center md:w-1/2 md:items-start md:text-left"> | |
| <div class="py-16"> | |
| <h2>{{ 'nextMeetup.title' | transloco }}</h2> | |
| <p class="mb-6">{{ 'nextMeetup.description' | transloco }}</p> | |
| <a | |
| id="meetup-link" | |
| rel="me noopener" | |
| target="_blank" | |
| href="https://www.meetup.com/python-catania/" | |
| role="button" | |
| aria-label="Meetup" | |
| class="inline-flex cursor-pointer items-center justify-center gap-2 rounded-(--radius) border-2 border-(--color-primary) bg-(--color-primary) px-4 py-2 text-base font-semibold text-white no-underline transition-colors hover:border-(--color-primary-hover) hover:bg-(--color-primary-hover) hover:text-white [&_svg]:shrink-0" | |
| > | |
| <app-icon-meetup />{{ 'nextMeetup.join' | transloco }}</a | |
| > | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| EOF | |
| jq 'del(.nextMeetup.date)' public/i18n/it.json > /tmp/it.json \ | |
| && mv /tmp/it.json public/i18n/it.json | |
| jq 'del(.nextMeetup.date)' public/i18n/en.json > /tmp/en.json \ | |
| && mv /tmp/en.json public/i18n/en.json | |
| - name: Commit and push changes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git add -A | |
| git commit -m "chore: reset next meetup to default" | |
| git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" "HEAD:${GITHUB_REF_NAME}" | |
| gh workflow run deploy.yml --ref "${GITHUB_REF_NAME}" -f sha="$(git rev-parse HEAD)" | |
| else | |
| echo "No changes to commit" | |
| fi |