create proposal for discord-announcements #117
Workflow file for this run
This file contains 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: CI/CD (fallctf.com) | |
on: | |
push: | |
paths: | |
- '_global/**' | |
- '!_global/content/**' | |
- '_global/content/events/**' | |
- '_global/content/profiles/**' | |
- '.github/**' | |
- '!.github/workflows/deploy-discord.yml' # This file is changed by the CI workflow | |
- 'fallctf.com/**' | |
- 'guides' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
CI: true | |
CI_WORKING_DIR: fallctf.com | |
CI_BUILD_DIR: dist | |
CI_CACHE_DIR: .cache | |
CI_BOOK_DIR: | |
jobs: | |
deploy: | |
name: Deploy (fallctf.com) | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- name: Build 2023 mdbook | |
uses: ./.github/actions/build-mdbook | |
with: | |
book-directory: fallctf-2023 | |
- name: Build 2024 mdbook | |
uses: ./.github/actions/build-mdbook | |
with: | |
book-directory: fallctf-2024 | |
- name: Build site | |
uses: ./.github/actions/build-astro | |
with: | |
working-directory: ${{ env.CI_WORKING_DIR }} | |
build-directory: ${{ env.CI_BUILD_DIR }} | |
cache-directory: ${{ env.CI_CACHE_DIR }} | |
- name: Deploy to Cloudflare Pages | |
if: github.actor != 'dependabot[bot]' | |
uses: cloudflare/pages-action@v1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_PAGES_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME_FALLCTF }} | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
workingDirectory: ${{ env.CI_WORKING_DIR }} | |
directory: ${{ env.CI_BUILD_DIR }} |