Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
Update publish.yml

Update publish.yml
  • Loading branch information
frullah committed Mar 27, 2021
1 parent 52dc027 commit 8a07264
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Publish

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

env:
CI: true

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 14
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Cache pnpm modules
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Setup PNPM
uses: pnpm/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
version: 5
run_install: true
- name: Generate static site
env:
NODE_ENV: production
run: pnpm run export
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./__sapper__/export

0 comments on commit 8a07264

Please sign in to comment.