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

Commit

Permalink
Merge pull request #5 from kachick/deploy-staging
Browse files Browse the repository at this point in the history
Try staging feature
  • Loading branch information
kachick authored May 13, 2022
2 parents 0413d11 + 3f54883 commit 5dc6e22
Showing 1 changed file with 22 additions and 2 deletions.
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

0 comments on commit 5dc6e22

Please sign in to comment.