Skip to content

Update hugo + theme #41

Update hugo + theme

Update hugo + theme #41

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build and push
# Controls when the action will run.
on:
# Triggers the workflow on push and pull request events
push:
pull_request:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.121.2'
extended: true
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- run: npm install
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Enable Configuration
run: cp config.toml.${{ steps.extract_branch.outputs.branch }} config.toml
- name: Build Page
run: |
mv static/css/app.css themes/paper/assets/custom.css
npm run build
- name: Deploy to Staging
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/staging' }}
with:
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: koneko096/staging
publish_branch: master
- name: Deploy to Live
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/source' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: master