(action) Update dist (#372) #101
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
on: | |
push: | |
branches: | |
- master | |
name: CI Release Dist | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-versions: | |
- 20 | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/cancel-workflow-action@0.9.1 | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-versions }} | |
- name: NPM Install | |
working-directory: ./ui | |
run: npm install | |
- name: Lint | |
working-directory: ./ui | |
run: | | |
npm run lint | |
- name: Export dist to resources for Laravel | |
working-directory: ./ui | |
run: | | |
npm run export | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v4 | |
with: | |
commit-message: (action) Update dist | |
title: (action) update dist astro | |
- name: Export dist to resources for gh-pages | |
working-directory: ./ui | |
run: | | |
PUBLIC_BASE=laravel-request-docs npm run export | |
- name: .nojekyll | |
run: touch ./resources/dist/.nojekyll | |
- name: Deploy Demo | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./resources/dist | |
publish_branch: gh-pages |