-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
51c8b36
commit a2cabdb
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
on: | ||
push: | ||
branches: | ||
- release | ||
|
||
env: | ||
PROJECT_NAME: 7guis | ||
WASM_PACK_URL: https://github.com/rustwasm/wasm-pack/releases/download/v0.10.3/wasm-pack-v0.10.3-x86_64-unknown-linux-musl.tar.gz | ||
POLYESTER_CLI_URL: https://github.com/polyester-web/polyester-cli/releases/download/0.1.0-alpha4/poly_linux-x64.tar.gz | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Deploy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 16 | ||
|
||
- name: Install wasm-pack | ||
run: | | ||
mkdir -p ${HOME}/bin | ||
wget --quiet -O wasm-pack.tar.gz $WASM_PACK_URL | ||
tar -zxf wasm-pack.tar.gz --directory ${HOME}/bin --strip 1 --no-anchored --wildcards wasm-pack | ||
rm wasm-pack.tar.gz | ||
- name: Install polyester-cli | ||
run: | | ||
mkdir -p ${HOME}/bin | ||
wget --quiet -O poly.tar.gz $POLYESTER_CLI_URL | ||
tar -zxf poly.tar.gz --directory ${HOME}/bin poly | ||
rm poly.tar.gz | ||
- name: Build project | ||
run: | | ||
PATH="${PATH}:${HOME}/bin" poly build --release --hash-assets --script post_build.sh | ||
- name: Publish | ||
uses: cloudflare/wrangler-action@2.0.0 | ||
with: | ||
apiToken: ${{ secrets.CF_API_TOKEN }} | ||
accountId: ${{ secrets.CF_ACCOUNT_ID }} | ||
command: pages publish dist --branch release --project-name=${{ env.PROJECT_NAME }} |