Skip to content

Commit

Permalink
Build on PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
schani committed Sep 26, 2023
1 parent 4d2586b commit 105658c
Showing 1 changed file with 37 additions and 34 deletions.
71 changes: 37 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,43 @@
name: Build & Deploy

on:
push:
branches:
- master
push:
branches:
- master
pull_request:
branches:
- main

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: npm i
- name: Build
run: npm run export
- name: Archive Build
uses: actions/upload-artifact@master
with:
name: public
path: public
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
run: npm i
- name: Build
run: npm run export
- name: Archive Build
uses: actions/upload-artifact@master
with:
name: public
path: public

deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: public
path: deploy
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Download Artifact
uses: actions/download-artifact@master
with:
name: public
path: deploy
- name: GitHub Pages action
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: deploy

0 comments on commit 105658c

Please sign in to comment.