Skip to content

Create 2024-04-15-maintenance.md #117

Create 2024-04-15-maintenance.md

Create 2024-04-15-maintenance.md #117

Workflow file for this run

name: Build static site
on:
workflow_dispatch:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
name: Build site
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: szenius/[email protected]
with:
timezoneLinux: "Asia/Shanghai"
- name: Check Time
run: date
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Check yarn / node version
run: |
echo "yarn version `yarn --version`"
echo "node version `node -v`"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Install Dependencies
run: yarn install
- name: Build Site
run: yarn build
- name: Deploy to GitHub page
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: ./site/.vuepress/dist/
publish_branch: static-site
force_orphan: true
# build-and-deploy:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@master
# with:
# fetch-depth: 0
# - name: vuepress-deploy
# uses: jenkey2011/[email protected]
# env:
# ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
# TARGET_REPO: SUSTech-CRA/ccse-mirrors-web
# TARGET_BRANCH: static-site
# BUILD_SCRIPT: yarn && yarn build
# BUILD_DIR: site/.vuepress/dist/
# TZ: Asia/Shanghai