security(deps-tree): update postcss
to v8.4.31 [security]
#842
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
# https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | |
# Workflows commands (::set-output, etc): # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-output-parameter | |
name: Test, Build, and Deploy βββ¨π | |
on: | |
push: | |
branches: [main, dicoding] | |
pull_request: | |
branches: [main] | |
jobs: | |
test_build: | |
name: Test and Build ββ | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [16.x, 14.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/[email protected] | |
- name: Use NodeJS ${{ matrix.node }} π¦ | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Get Yarn Cache Directory Path π | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- name: Cache Directories π§Ά | |
uses: actions/[email protected] | |
with: | |
path: | | |
${{ steps.yarn-cache-dir-path.outputs.dir }} | |
${{ github.workspace }}/node_modules/.cache | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }} | |
- name: Install Dependencies β¨ | |
run: yarn install --immutable --check-cache | |
- name: Run Linter π¨π»βπ» | |
run: yarn type-check && yarn lint | |
- name: Run Formatter π | |
run: yarn format | |
- name: Run Test π | |
run: yarn test | |
- name: Run E2E Test π₯π§ͺ | |
if: matrix.node-version == '14.x' | |
run: yarn test:e2e | |
- name: Run Build β | |
run: yarn build | |
- name: Cache build ready to deploy π | |
uses: actions/[email protected] | |
with: | |
path: | | |
./dist | |
key: ${{ github.sha }}-${{ runner.os }}-${{ matrix.node-version }} | |
deploy: | |
name: Deploy to production β¨π | |
needs: test_build | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dicoding' | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node-version: [14.x] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout ποΈ | |
uses: actions/[email protected] | |
- name: Restore build cache β»οΈ | |
uses: actions/[email protected] | |
with: | |
path: | | |
./dist | |
key: ${{ github.sha }}-${{ runner.os }}-${{ matrix.node-version }} | |
- name: Deploy π | |
if: github.ref == 'refs/heads/main' | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
cname: aladine.latipun.dev | |
- name: Deploy π | |
if: github.ref == 'refs/heads/dicoding' | |
uses: peaceiris/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./dist | |
publish_branch: github-pages-dicoding |