Build the site with tools from Alpine
parent
df6f4b2ba3
commit
5e8f29e60a
|
@ -15,24 +15,32 @@ jobs:
|
||||||
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
if: "! contains(toJSON(github.event.commits.*.message), '[skip ci]')"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/setup-node@v3
|
- name: Prepare Alpine Linux with tools (latest)
|
||||||
- uses: peaceiris/actions-hugo@v2
|
uses: jirutka/setup-alpine@v1
|
||||||
with:
|
with:
|
||||||
hugo-version: latest
|
extra-repositories: |
|
||||||
extended: true
|
https://dl-cdn.alpinelinux.org/alpine/edge/community
|
||||||
- run: sudo apt install -y opencc
|
packages: >
|
||||||
name: Prepare OpenCC
|
bash
|
||||||
- run: ./scripts/opencc.sh
|
hugo
|
||||||
name: Execute OpenCC
|
nodejs
|
||||||
- run: npm ci
|
npm
|
||||||
name: Prepare Node.js packages
|
opencc
|
||||||
- run: hugo --minify
|
- name: Execute OpenCC in Alpine
|
||||||
name: Generate webpages for production
|
run: bash ./scripts/opencc.sh
|
||||||
|
shell: alpine.sh {0}
|
||||||
|
- name: Prepare Node.js packages in Alpine
|
||||||
|
run: npm ci
|
||||||
|
shell: alpine.sh {0}
|
||||||
|
- name: Build the site in Alpine
|
||||||
|
run: hugo --minify
|
||||||
env:
|
env:
|
||||||
HUGO_DISABLELANGUAGES: 'en'
|
HUGO_DISABLELANGUAGES: 'en'
|
||||||
- run: npx wrangler pages deploy public --project-name tfsci --branch main
|
shell: alpine.sh {0}
|
||||||
|
- name: Upload to CloudFlare
|
||||||
|
run: npx wrangler pages deploy public --project-name tfsci --branch main
|
||||||
if: github.ref == 'refs/heads/main'
|
if: github.ref == 'refs/heads/main'
|
||||||
env:
|
env:
|
||||||
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
|
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }}
|
||||||
name: Upload to CloudFlare
|
shell: bash
|
||||||
|
|
Loading…
Reference in New Issue