Skip to content

Commit

Permalink
Merge pull request #285 from paritytech/ae-change-deploy-action
Browse files Browse the repository at this point in the history
Change deploy workflow
  • Loading branch information
statictype committed Apr 14, 2022
2 parents 7f9ea4e + 6c643d2 commit e6e43c4
Showing 1 changed file with 12 additions and 36 deletions.
48 changes: 12 additions & 36 deletions .github/workflows/deploy.yml
Expand Up @@ -5,44 +5,20 @@ on:
branches: [master]

jobs:
build:
build-and-deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [14.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Cache Node.js modules
uses: actions/cache@v2
id: yarn-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Build
run: yarn build
- name: Init new repo in dist folder and commit generated files
- name: Checkout 🛎️
uses: actions/checkout@v3

- name: Install and Build 🔧
run: |
cd dist
git config --global --add safe.directory /github/workspace/dist
git init
git add -A
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m 'deploy'
yarn
yarn build
- name: Force push to destination branch
uses: ad-m/github-push-action@v0.5.0
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4.3.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
force: true
directory: ./dist
branch: gh-pages
folder: dist

0 comments on commit e6e43c4

Please sign in to comment.