meta: update dependency lint-staged to v14.0.1 #1310
Workflow file for this run
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: Website draft build | |
on: | |
pull_request: | |
branches: | |
- main | |
# This configuration cancels previous runs if a new run is started on the same PR. Only one run at a time per PR. | |
# From https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16.x | |
cache: yarn | |
- run: yarn install --frozen-lockfile | |
- run: yarn lint-no-fix | |
- run: yarn lint-scss-no-fix | |
- run: yarn typecheck | |
- run: yarn sync | |
- run: yarn build | |
- name: Deploy to Draft to Netlify | |
if: '! github.event.pull_request.head.repo.fork' | |
id: deployment | |
env: | |
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | |
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} | |
shell: bash | |
run: | | |
netlify deploy --dir build --message '${{ github.event.commits[0].message }}' > log.tmp.txt 2>&1 | |
cat log.tmp.txt | grep -E 'Website draft URL:' > log.txt | |
- name: Read deployment log | |
if: '! github.event.pull_request.head.repo.fork' | |
id: logs | |
uses: juliangruber/read-file-action@v1 | |
with: | |
path: log.txt | |
- name: Comment PR with draft publish logs | |
if: '! github.event.pull_request.head.repo.fork' | |
id: create-comment | |
uses: peter-evans/create-or-update-comment@v3 | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
${{ steps.logs.outputs.content }} | |
- name: Comment debug | |
if: '! github.event.pull_request.head.repo.fork' | |
run: | | |
echo "Comment ID - ${{ steps.create-comment.outputs.comment-id }}" |