Skip to content

Commit

Permalink
Fix dependabot builds failing for sigpwny.com
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteHoodHacker authored Nov 1, 2024
1 parent 4fa47bd commit a7c971b
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/deploy-sigpwny.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,24 @@ jobs:
name: Deploy (sigpwny.com)
runs-on: ubuntu-latest
permissions:
contents: write
contents: read
deployments: write
steps:
- name: Check out repository code
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
Expand All @@ -52,7 +48,6 @@ jobs:
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
workingDirectory: ${{ env.CI_WORKING_DIR }}
directory: ${{ env.CI_BUILD_DIR }}

- name: (On main) Sync Discord events
if: github.ref_name == github.event.repository.default_branch
# https://github.com/nodejs/node/issues/50993
Expand All @@ -62,15 +57,38 @@ jobs:
env:
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
DISCORD_SERVER_ID: ${{ secrets.DISCORD_SERVER_ID }}

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: ${{ env.CI_WORKING_DIR }}/${{ env.CI_BUILD_DIR }}
schedule-notify:
name: Schedule notifications (sigpwny.com)
if: github.ref_name == github.event.repository.default_branch
needs: deploy
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
token: ${{ secrets.WORKFLOW_PAT }}
submodules: true
fetch-depth: 0
- name: Initialize Astro and dependencies
uses: ./.github/actions/build-astro
with:
working-directory: ${{ env.CI_WORKING_DIR }}
build-directory: ${{ env.CI_BUILD_DIR }}
cache-directory: ${{ env.CI_CACHE_DIR }}
skip-build: true
- name: Schedule Discord pings
run: npm run schedule-discord-ping
if: github.ref_name == github.event.repository.default_branch
shell: bash
working-directory: ${{ env.CI_WORKING_DIR }}
- name: Save scheduled discord pings
if: github.ref_name == github.event.repository.default_branch
- name: Save scheduled Discord pings
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "chore: update workflow schedule"
file_pattern: "*.yml"
file_pattern: "*.yml"

0 comments on commit a7c971b

Please sign in to comment.