Skip to content

Commit

Permalink
chore: use GitHub actions to deploy pages.
Browse files Browse the repository at this point in the history
  • Loading branch information
scopewu committed Sep 11, 2021
1 parent e9a55a7 commit 1e9eea7
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 40 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This is a basic workflow to help you get started with Actions

name: Deploy GitHub pages

# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@main
with:
node-version: '14'

- name: Install dependencies
run: |
npm install -g yarn
yarn install
- name: Build
run: yarn webpack --mode=production

- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: example/dist # The folder the action should deploy.
clean: true
19 changes: 0 additions & 19 deletions .travis.yml

This file was deleted.

20 changes: 0 additions & 20 deletions deploy-github-pages.sh

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"scripts": {
"start": "webpack serve --config webpack.config.js --mode=development --open",
"build": "rimraf dist && rollup -c",
"github:pages": "sh deploy-github-pages.sh",
"prepublishOnly": "npm run build"
},
"repository": {
Expand Down

0 comments on commit 1e9eea7

Please sign in to comment.