blob: a62ae904c3267d11f8aa8b7798cda4fa52fd219e [file] [log] [blame]
name: Build and Deploy
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
# Run everyday at 5:00 AM (See https://pubs.opengroup.org/onlinepubs/9699919799/utilities/crontab.html#tag_20_25_07)
- cron: "0 5 * * *"
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.19.0
- name: install
run: |
npm set strict-ssl false
npm install
- name: Documents Sync
run: |
npm run sync
- name: Build
run: |
npm run build
- name: Copy .asf.yaml
run: |
cp .asf.yaml build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.event_name == 'schedule'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build
publish_branch: asf-site