31 lines
1.1 KiB
YAML
31 lines
1.1 KiB
YAML
name: deploy
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "20.x"
|
|
cache: "npm"
|
|
- run: npm ci
|
|
- run: echo "COMMIT_SHORT_SHA=`git rev-parse --short HEAD`" >> $GITHUB_ENV
|
|
- run: npm run build
|
|
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 }}
|
|
- run: npx wrangler pages deploy out --project-name=$CF_PROJECT_NAME --branch=$GITHUB_REF_NAME
|
|
env:
|
|
CLOUDFLARE_API_TOKEN: ${{ vars.CLOUDFLARE_API_TOKEN }}
|
|
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
|
CF_PROJECT_NAME: ${{ vars.CF_PROJECT_NAME }}
|