mirror of
https://github.com/Xevion/grain.git
synced 2025-12-05 23:15:08 -06:00
38 lines
965 B
YAML
38 lines
965 B
YAML
name: deploy
|
|
on: [push]
|
|
jobs:
|
|
build:
|
|
name: Deploy 'grain'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: borales/actions-yarn@v3.0.0
|
|
with:
|
|
cmd: install # will run `yarn install` command
|
|
- uses: borales/actions-yarn@v3.0.0
|
|
with:
|
|
cmd: build # will run `yarn build` command
|
|
|
|
- name: Upload production-ready build files
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: production-files
|
|
path: ./dist
|
|
deploy:
|
|
name: Deploy
|
|
needs: build
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/main'
|
|
|
|
steps:
|
|
- name: Download artifact
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: production-files
|
|
path: ./dist
|
|
|
|
- name: Deploy to GitHub Pages
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: ./dist |