Skip to content

software-cache-invalidated #5965

software-cache-invalidated

software-cache-invalidated #5965

Workflow file for this run

name: Build and Deploy Unified DeadForge Site
on:
push:
branches:
- 2024/2025
release:
types:
- published
- unpublished
- created
- edited
- deleted
- prereleased
- released
repository_dispatch:
types: ["store-updated", "software-cache-invalidated"]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build-and-deploy:
if: |
github.event_name == 'repository_dispatch' ||
github.event_name == 'release' ||
(github.ref == 'refs/heads/2024/2025' && contains(join(github.event.commits.*.added, github.event.commits.*.modified), 'PRIVACY.md'))
runs-on: ubuntu-latest
steps:
- name: Checkout DeadForge
uses: actions/checkout@v4
with:
ref: web
- name: Clone DeadForgeStore
uses: actions/checkout@v4
with:
repository: DeadCodeGames/DeadForgeStore
ref: master
token: ${{secrets.DEADFORGESTORE_PULL_PAT}}
path: store
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Install & Build DeadForgeStore
working-directory: ./store
run: |
CI=false
npm install --force
npm run build
- name: Copy DeadForgeStore build to /store
run: |
mkdir -p ./public/store
cp -r ./store/build/* ./public/store/
- name: Clone DeadForgeStore GitHub API Cacher
uses: actions/checkout@v4
with:
repository: DeadCodeGames/DeadForgeSoftwareGitHubReleasesCache
ref: main
token: ${{secrets.DEADFORGESTORE_PULL_PAT}}
path: cacher
- name: Build DeadForge Software Cache
working-directory: ./cacher
run: node cache-github-releases.mjs
env:
GITHUB_TOKEN: ${{ secrets.DEADFORGESTORE_PULL_PAT }}
- name: Copy DeadForge Software Cache build to /software-gh-pages-cache
run: |
mkdir -p ./public/store/software-gh-pages-cache/
cp -r ./cacher/software-gh-pages-cache/* ./public/store/software-gh-pages-cache/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./public
deploy:
needs: build-and-deploy
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4