You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Sapper Action
1.0.1
Use this action to build your static website with Sapper.
To use it, create a .github/workflows/sapper_build.yml
file in your Sapper website repository, which uses this article, as an action.
This action accepts a couple of optional inputs:
Input Name | Required? | Default | Description |
---|---|---|---|
build_mode |
No | "export" |
Build mode to the Sapper (could be build or export ) |
args |
No | "--legacy" |
Arguments to pass to the Sapper invocation |
For example:
- name: Build
uses: truewebartisans/actions-sapper@master
with:
build_mode: "export"
args: "--legacy --entry about"
These are examples, which builds the website with this action, then deploys with another action.
- Deploy action: peaceiris/actions-gh-pages
name: Build Sapper and Deploy to GitHub Pages
on: [push]
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build Sapper
uses: truewebartisans/actions-sapper@master
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@master
env:
PUBLISH_DIR: __sapper__/export
PUBLISH_BRANCH: gh-pages
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- Deploy action: appleboy/scp-action
name: Build Sapper and Deploy to remote virtual server via SSH
on: [push]
jobs:
build_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Build Sapper
uses: truewebartisans/actions-sapper@master
with:
build_mode: "build"
- name: Deploy to remote virtual server via SSH
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
rm: true
source: __sapper__/build/
target: ${{ secrets.REMOTE_DIR }}
MIT © Vic Shóstak & True web artisans.