mirror of
https://github.com/ivuorinen/generic-landing-page.git
synced 2026-01-26 11:44:00 +00:00
chore(workflows): Reformat build, add permissions
This commit is contained in:
49
.github/workflows/build.yml
vendored
49
.github/workflows/build.yml
vendored
@@ -1,11 +1,14 @@
|
||||
name: Build example page
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -16,28 +19,28 @@ jobs:
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Build production assets
|
||||
run: |
|
||||
npm install
|
||||
npm run prod --if-present
|
||||
- name: Build production assets
|
||||
run: |
|
||||
npm install
|
||||
npm run prod --if-present
|
||||
|
||||
- name: Store artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-site
|
||||
path: dist
|
||||
- name: Store artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: build-site
|
||||
path: dist
|
||||
|
||||
- name: Build GitHub Pages
|
||||
uses: crazy-max/ghaction-github-pages@v3.1.0
|
||||
with:
|
||||
build_dir: dist
|
||||
jekyll: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: Build GitHub Pages
|
||||
uses: crazy-max/ghaction-github-pages@v3.1.0
|
||||
with:
|
||||
build_dir: dist
|
||||
jekyll: false
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user