Skip to content

Commit

Permalink
action deploys to surge.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mingness committed May 28, 2024
1 parent 13f4c89 commit 91f92a2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/deploy-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy PR CI
on:
issue_comment:
types: [created]
push:
branches-ignore:
- main
pull_request:
types:
- opened
- edited
- synchronize
jobs:
release:
name: Deploy website
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && (contains(github.event.comment.body, 'Deploy') || contains(github.event.comment.body, 'deploy') || github.event_name == 'push' || github.event_name == 'pull_request')"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1.5'
bundler-cache: true
- name: Build static site
run: bundle exec jekyll build
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Install surge
run: npm install -g surge
- name: Deploy
run: surge _site/ ${{vars.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN}}

0 comments on commit 91f92a2

Please sign in to comment.