Skip to content

Update about page

Update about page #19

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
pull_request:
types:
- opened
- reopened
- synchronize
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cache
id: cache-frontend
uses: actions/cache@v3
with:
key: frontend-$NODE_ENV-${{ hashFiles('**/package-lock.json') }}
path: |
node_modules
restore-keys: |
frontend-$NODE_ENV-
frontend-
- run: npm install
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
pull-requests: write
needs: build
name: Deploy
env:
NODE_ENV: production
outputs:
preview_url: ${{ steps.cloudflare-deploy.outputs.url }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 19
- uses: actions/cache@v3
with:
key: frontend-$NODE_ENV-${{ hashFiles('**/package-lock.json') }}
path: |
node_modules
restore-keys: |
frontend-$NODE_ENV-
frontend-
- run: npm run build
- name: Deploy
id: cloudflare-deploy
uses: cloudflare/pages-action@1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: erison-work # e.g. 'my-project'
directory: dist # e.g. 'dist'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
comment:
runs-on: ubuntu-latest
needs:
- deploy
name: Add comment in Pull request
steps:
- name: Comment PR
if: github.event_name == 'pull_request'
uses: mshick/add-pr-comment@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PREVIEW_URL: ${{ steps.cloudflare-deploy.outputs.url }}
with:
message: |
🚀 This branch can be previewed at ${{ needs.deploy.outputs.preview_url }}