Skip to content

Commit

Permalink
feat(devops): Add build and deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
xavier506 committed Oct 16, 2021
1 parent 1c43f06 commit 85af067
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Deployment
on:
push:
tags:
- v*
jobs:
deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install Packages
run: yarn --frozen-lockfile

- name: Build page
run: yarn run build

- name: Set 404 page as index.html
run: cp ./build/index.html ./build/404.html

- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build

- name: Create Release
id: create_release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true

env:
REACT_APP_NAME: ticoblockchain.cr
REACT_APP_PROJECT_VERSION: ${{ github.ref }}

0 comments on commit 85af067

Please sign in to comment.