fix cgo error #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
workflow_dispatch: | |
inputs: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
store: ${{ steps.install.outputs.store }} | |
steps: | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Checkout [blog] | |
uses: actions/checkout@v4 | |
with: | |
repository: tiechui1994/blog | |
fetch-depth: 5 | |
ref: master | |
persist-credentials: false | |
token: ${{secrets.TOKEN}} | |
- name: Checkout [golang] | |
uses: actions/checkout@v4 | |
with: | |
repository: tiechui1994/golearn | |
fetch-depth: 5 | |
ref: master | |
path: static/markdown | |
persist-credentials: false | |
- name: Restore Cache | |
uses: actions/cache@v4 | |
with: | |
path: ./node_modules | |
key: ${{github.repository}}-vercel_golang_blog | |
- name: Install | |
id: install | |
run: | | |
if [[ -n $(git diff --name-status HEAD^ HEAD|grep -o 'package.json') || ! -e ./node_modules ]]; | |
then | |
echo "store=1" >> $GITHUB_OUTPUT | |
rm -rf ./node_modules | |
npm install | |
fi | |
shell: bash | |
- name: Deploy vercel [golang] | |
timeout-minutes: 30 | |
if: ${{ success() }} | |
run: | | |
npm i [email protected] --save-dev | |
node src/deploy/vercel.js --project golearn --domain golang --token ${{secrets.VERCEL}} | |
- name: Store Cache | |
uses: actions/cache@v4 | |
if: ${{ success() && steps.install.outputs.store == 1 }} | |
with: | |
path: ./node_modules | |
key: ${{github.repository}}-vercel_golearnblog | |