Skip to content

update

update #33

Workflow file for this run

name: Deploy Site
on:
push:
branches:
- master
env:
GO111MODULE: "on"
UPX_SERVICE_NAME: ${{ secrets.UPX_SERVICE_NAME }}
UPX_OPERATOR: ${{ secrets.UPX_OPERATOR }}
UPX_PASSWORD: ${{ secrets.UPX_PASSWORD }}
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Restore file modification time
run: git ls-files -z | while read -d '' path; do touch -d "$(git log -1 --format="@%ct" "$path")" "$path"; done
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Node
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install Package
run: pnpm install
- name: Install Golang
uses: actions/setup-go@v3
with:
go-version: 1.17.x
- run: go version
- name: Cache Upx
uses: actions/cache@v2
id: cache-upx
with:
path: ~/go/
key: ${{ runner.os }}-go-upx
- name: Install Upx
if: steps.cache-upx.outputs.cache-hit != 'true'
run: |
go get -u github.com/upyun/[email protected]
- name: Login Upx
run: |
${HOME}/go/bin/upx login "${{ env.UPX_SERVICE_NAME }}" "${{ env.UPX_OPERATOR }}" "${{ env.UPX_PASSWORD }}"
- name: Build
run: npm run build
- name: Deploy
run: |
${HOME}/go/bin/upx sync ./dist/