Skip to content

Build and Deploy

Build and Deploy #1275

Workflow file for this run

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: 14
- name: Documents Sync
run: |
bash ./tools/build-docs.sh
shell: bash
- name: install
run: |
npm install
- 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