Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

Try staging feature #5

Merged
merged 1 commit into from
May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 22 additions & 2 deletions .github/workflows/deploy_products.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ on:
- 'package.json'
- 'package-lock.json'
- '.github/workflows/deploy_products.yml'
pull_request:
paths:
- 'src/**'
- 'docs/**'
- 'elm.json'
- 'package.json'
- 'package-lock.json'
- '.github/workflows/deploy_products.yml'
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -19,11 +27,23 @@ jobs:
elm-version: 0.19.1
- name: install npm dependencies
run: npm install
- name: Get Pull Request Number
id: pr
run: echo "::set-output name=pull_request_number::$(gh pr view --json number -q .number || echo "")"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: |
cp -rf docs "docs/pr-${PULL_REQUEST_NUMBER}"
elm make src/Main.elm --output="docs/pr-${PULL_REQUEST_NUMBER}/main.js"
if: github.event_name == 'pull_request'
with:
PULL_REQUEST_NUMBER: ${{ steps.pr.outputs.pull_request_number }}
- run: elm make src/Main.elm --output=docs/main.js
if: github.event_name != 'pull_request'
- name: git setting
run: |
git config --local user.email "kachick1@gmail.com"
git config --local user.name "Kenichi Kamiya"
git config --local user.email "kachick1+mobu-elm@gmail.com"
git config --local user.name "mobu-elm bot"
- name: Deploy to GitHub Pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down