docs(readme): update CI status badge image url #34
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
Build: | |
if: "!contains(github.event.head_commit.message, '[skip ci]')" | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: 12 | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.pnpm-store | |
key: pnpm-install-v3-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
pnpm-install-v3- | |
- uses: pnpm/action-setup@v2.0.1 | |
with: | |
version: 6 | |
run_install: true | |
# The initial build after pnpm install fails for some reason so for now we will build twice | |
- name: Build | |
run: | | |
pnpm build:debug | |
pnpm build | |
pnpm postbuild | |
- if: github.event_name == 'push' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: build-art | |
path: dist | |
Deploy: | |
if: github.event_name == 'push' | |
needs: Build | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
repository: awesomehub/awesomehub.github.io | |
token: ${{ secrets.PAT }} | |
path: deploy | |
- run: rm -r deploy/dist/* | |
- uses: actions/download-artifact@v2 | |
id: download | |
with: | |
name: build-art | |
path: deploy/dist | |
- uses: peter-evans/create-pull-request@v3 | |
with: | |
branch: staging | |
path: deploy | |
token: ${{ secrets.PAT }} | |
commit-message: ${{ github.event.head_commit.message }} ${{ github.event.head_commit.url }} | |
title: ${{ github.event.head_commit.message }} | |
body: | | |
## Build Information | |
- ### Action | |
${{ github.workflow }} [#${{ github.run_number }}](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) | |
- ### Commit | |
${{ github.event.head_commit.message }} ${{ github.event.head_commit.url }} | |
- ### Author | |
@${{ github.actor }} | |
--- | |
> :rocket: *This report is autogenerated, any changes made will be overwrittten with the next commit.* | |
labels: | | |
deploy | |
automated | |
assignees: ${{ github.actor }} |