Skip to content

Commit

Permalink
migrate to cloudflare pages
Browse files Browse the repository at this point in the history
  • Loading branch information
septs committed Aug 26, 2023
1 parent 0f7c1b4 commit 9a338d4
Showing 1 changed file with 9 additions and 17 deletions.
26 changes: 9 additions & 17 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Publish

on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build:
Expand All @@ -18,20 +22,8 @@ jobs:
extended: true
- run: npm ci
- run: hugo --minify
- if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
with:
path: public
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-22.04
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- run: npx wrangler pages deploy public --project-name 2345-lgbt --branch main
if: github.ref == 'refs/heads/main'
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}

0 comments on commit 9a338d4

Please sign in to comment.