Skip to content

Workflow file for this run

on:
push:
paths:
- '.github/workflows/deploy-test.yml'
env:
CI: true
CI_WORKING_DIR: sigpwny.com
CI_BUILD_DIR: dist
CI_CACHE_DIR: .cache
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
deployments: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_PAT }}
submodules: true
fetch-depth: 0
- name: Build pwnyctf mdbook
uses: ./.github/actions/build-mdbook
with:
book-directory: pwnyctf
- 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_SIGPWNY }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
workingDirectory: ${{ env.CI_WORKING_DIR }}
directory: ${{ env.CI_BUILD_DIR }}
- name: Save scheduled discord pings
run: |
echo -e "name: \"workflow\"\non: workflow_dispatch3" > .github/workflows/date.yml
# Note: the following account information will not work on GHES
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "generated"
git push