Skip to content

Commit

Permalink
deployment action
Browse files Browse the repository at this point in the history
  • Loading branch information
ov7a committed Jun 30, 2024
1 parent 4958046 commit 1a162c1
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Deploy

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
container: nimlang/nim:2.0.6-ubuntu
env:
WASI_SDK_PATH: /opt/wasi-sdk
steps:
- uses: actions/checkout@v2

- name: setup WASI SDK
run: |
mkdir ${{ env.WASI_SDK_PATH }}
export WASI_VERSION=22
export WASI_VERSION_FULL=${WASI_VERSION}.0
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_VERSION}/wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz
tar --strip-components=1 --directory ${{ env.WASI_SDK_PATH }} --extract --gunzip -f wasi-sdk-${WASI_VERSION_FULL}-linux.tar.gz
- name: setup wasm4
run: npm install -g wasm4

- name: assemble
run: nimble rel

- name: package
run: w4 bundle --html build/html/index.html --title 'Sapper' --description 'https://github.com/ov7a/sapper' build/sapper.wasm

- name:
id: push_directory
uses: cpina/github-action-push-to-another-repository@07c4d7b3def0a8ebe788a8f2c843a4e1de4f6900
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: build/html/
destination-github-username: 'ov7a'
destination-repository-name: 'ov7a.github.io'
user-email: [email protected]
commit-message: autocommit from ORIGIN_COMMIT
target-branch: master
target-directory: sapper

0 comments on commit 1a162c1

Please sign in to comment.