Add deployment workflow

This commit is contained in:
Piotr Rogowski 2023-06-19 12:17:02 +02:00
parent dc1b70c600
commit f27ae51caf
No known key found for this signature in database
GPG Key ID: 4A842D702D9C6F8F
2 changed files with 35 additions and 2 deletions

View File

@ -5,8 +5,6 @@ concurrency:
cancel-in-progress: true
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

35
.github/workflows/deploy.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Deploy
concurrency:
group: ${{ github.ref }}-deploy
cancel-in-progress: true
on:
push:
branches: [ master ]
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: "npm"
- run: npm ci
- run: npm run build
- uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: wiki
directory: build
gitHubToken: ${{ secrets.GITHUB_TOKEN }} # GitHub Deployments
branch: master
wranglerVersion: '3'