Skip to content

Deploy

Deploy #107

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows: ["Build", "Pull Request"]
types: [completed]
permissions:
actions: read
contents: read
pull-requests: write
deployments: write
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Download build artifact
uses: actions/download-artifact@v4
id: build-artifact
with:
name: pages-build
path: build
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
- name: Deploy to Cloudflare Pages
uses: AdrianGonz97/refined-cf-pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_KEY }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
projectName: galaxypedia
deploymentName: ${{ github.event.workflow_run.name == 'Pull Request' && 'Preview' || 'Production' }}
directory: ${{ steps.build-artifact.outputs.download-path }}