Skip to content

on-push

on-push #73

Workflow file for this run

name: on-push
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '.github/**'
permissions:
pages: write
id-token: write
# push
contents: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_OWNER: ${{ github.repository_owner }}
GITHUB_REPO: ${{ github.repository }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Cache dependencies
uses: actions/cache@v3
id: yarn-cache
with:
path: |
node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile
- name: Get issues
run: yarn all
- name: Build
run: yarn build --base /${{ github.event.repository.name }}/
- name: Push to new branch
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add -A
git commit -m "bot push"
continue-on-error: true
- name: Push changes
uses: ad-m/github-push-action@master
with:
branch: issues-page
force: true
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/configure-pages@v2
- uses: actions/upload-pages-artifact@v1
with:
path: docs/.vitepress/dist
deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- id: deployment
uses: actions/deploy-pages@v1