2024-02-12 15:16:50 +07:00
|
|
|
name: deploy
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v3
|
|
|
|
with:
|
2024-02-15 00:25:44 +07:00
|
|
|
node-version: "20.x"
|
2024-02-12 15:36:10 +07:00
|
|
|
cache: "npm"
|
2024-02-12 15:16:50 +07:00
|
|
|
- run: npm ci
|
2024-02-15 00:25:44 +07:00
|
|
|
- run: echo "COMMIT_SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
|
2024-02-12 15:16:50 +07:00
|
|
|
- run: npm run build
|
2024-02-12 15:36:10 +07:00
|
|
|
env:
|
|
|
|
MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }}
|
|
|
|
MINIO_ACCESS_KEY: ${{ vars.MINIO_ACCESS_KEY }}
|
|
|
|
MINIO_SECRET_KEY: ${{ vars.MINIO_SECRET_KEY }}
|
|
|
|
MINIO_BUCKET: ${{ vars.MINIO_BUCKET }}
|
|
|
|
PEERTUBE_FEED_URL: ${{ vars.PEERTUBE_FEED_URL }}
|
|
|
|
UMAMI_ENABLED: ${{ vars.UMAMI_ENABLED }}
|
|
|
|
UMAMI_SCRIPT_URL: ${{ vars.UMAMI_SCRIPT_URL }}
|
|
|
|
UMAMI_WEBSITE_ID: ${{ vars.UMAMI_WEBSITE_ID }}
|
2024-02-12 15:16:50 +07:00
|
|
|
- run: npx wrangler pages deploy out --project-name=$CF_PROJECT_NAME --branch=$GITHUB_REF_NAME
|
2024-02-12 15:52:19 +07:00
|
|
|
env:
|
|
|
|
CLOUDFLARE_API_TOKEN: ${{ vars.CLOUDFLARE_API_TOKEN }}
|
|
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
|
|
|
CF_PROJECT_NAME: ${{ vars.CF_PROJECT_NAME }}
|