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

Commit

Permalink
production following part of #4, #6
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed May 13, 2022
1 parent b896be5 commit 7e2756e
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 11 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy_majors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy major branches
on:
push:
branches: [ main ]
paths-ignore:
- 'tests/**'
- '.github/workflows/test.yml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: jorelali/setup-elm@v3
with:
elm-version: 0.19.1
- name: install npm dependencies
run: npm install
- run: |
cp -rf statics "docs/latest"
elm make src/Main.elm --output=docs/latest/main.js
if: github.event_name != 'pull_request'
- name: git setting
run: |
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 }}
run: |
DATE=`date +"%Y%m%d-%H%M-UTC"`
BRANCH_NAME="deploy-$DATE"
git checkout -b "$BRANCH_NAME"
find . | grep -v -P '\.git(\b|ignore)|docs|LICENSE|^\.$' | xargs rm -rf
git add docs
git commit -m 'Update with latest code'
git push origin "$BRANCH_NAME":gh-pages --force
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
name: Deploy products
name: Deploy stagings
on:
push:
branches: [ main ]
paths-ignore:
- 'tests/**'
- '.github/workflows/test.yml'
pull_request:
paths-ignore:
- 'tests/**'
Expand All @@ -26,10 +21,6 @@ jobs:
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ github.event.number }}
- run: |
cp -rf statics "docs/latest"
elm make src/Main.elm --output=docs/latest/main.js
if: github.event_name != 'pull_request'
- name: git setting
run: |
git config --local user.email "kachick1+mobu-elm@gmail.com"
Expand All @@ -51,7 +42,6 @@ jobs:
state: open
- name: notify
uses: actions/github-script@v6
if: github.event_name == 'pull_request'
env:
PR_NUMBER: ${{ steps.findPr.outputs.pr }}
with:
Expand Down

0 comments on commit 7e2756e

Please sign in to comment.