Skip to content

Deploy

Deploy #134

Workflow file for this run

name: Deploy
on:
workflow_dispatch:
schedule:
- cron: "30 11 * * *"
jobs:
Build:
runs-on: ubuntu-latest
env:
BUILD_DIR: /home/runner/work/build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: git clone main
uses: actions/checkout@v4
- name: Google Authentication
uses: google-github-actions/auth@v2
id: auth
with:
project_id: ${{ secrets.G_PROJECT_ID }}
service_account: ${{ secrets.SERVICE_ACCOUNT }}
workload_identity_provider: ${{ secrets.G_IDENTITY_PROVIDER }}
- name: Install requirements.txt
run: pip install -r requirements.txt
- name: Build the site
run: |
mkdir -p ${{ env.BUILD_DIR }}
cp -r public/* ${{ env.BUILD_DIR }}/
BING_WEBMASTER_API_KEY=${{ secrets.BING_WEBMASTER_API_KEY }} GA4_PROPERTY_ID=${{ secrets.GA4_PROPERTY_ID }} python build.py --dest=${{ env.BUILD_DIR }}
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.BUILD_DIR }}
- name: Deploy the Artifact to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4