Add CI job for running unit tests #317
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: Docs | |
on: | |
pull_request: | |
release: | |
types: [published] | |
env: | |
REPO_URL: github.com/flipbook-labs/flipbook | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Roblox/setup-foreman@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/[email protected] | |
- name: Install Moonwave | |
run: npm install -g moonwave | |
- name: Extract | |
run: moonwave-extractor extract src | |
- name: Build | |
run: moonwave build | |
- name: Configure Git user | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Use GITHUB_TOKEN to allow pushing | |
run: git remote set-url origin https://github-actions[bot]:${{ env.GITHUB_TOKEN }}@${{ env.REPO_URL }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Deploy | |
if: ${{ github.event.release }} | |
run: moonwave build --publish |