Skip to content

Release

Release #1281

Workflow file for this run

name: Release
on:
push:
branches: main
workflow_dispatch:
repository_dispatch:
types: [button_build]
schedule:
- cron: '0 0 * * *' # Daily build
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '12.x'
- name: Install jq
run: sudo apt-get install -y jq
- uses: actions/cache@v2
with:
path: /tmp/hugo_cache
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-hugomod-
- name: Cache dependencies
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install npm packages
run: npm install
- name: Download Members File
run: ./download.sh
env:
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
SPREADSHEET_ID: ${{ secrets.SPREADSHEET_ID }}
SHEET_ID: ${{ secrets.SHEET_ID }}
- name: Download Sponsors File
run: curl -o ./static/data/stuix-sponsors.json https://mirror.twds.com.tw/stuix-sponsors.json
- name: Generate Pages
env:
GO111MODULE: on
run: npm run generate
- name: Archive Production Artifact
uses: actions/upload-artifact@master
with:
name: dist
path: dist
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
cname: stuix.io
publish_dir: dist
force_orphan: true