-
Notifications
You must be signed in to change notification settings - Fork 98
35 lines (33 loc) · 972 Bytes
/
surge.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Surge
on:
workflow_run:
workflows: ["Pull Request"]
types:
- completed
jobs:
build:
name: Surge
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.workflow_run.head_sha}}
- name: Set up Ruby
uses: ruby/setup-ruby@d3c9825d67b0d8720afdfdde5af56c79fdb38d16 #v1
with:
ruby-version: 2.4.1
bundler-cache: true
- name: Generate site
run: |
bundle exec rake actions
- uses: afc163/surge-preview@aef1ba438fafc353616c0bf225b6803bdd6367d2 #v1
id: preview_step
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: _site
failOnError: 'true'
build: |
echo Deploying to surge.sh
- name: Get the preview_url
run: echo "url => ${{ steps.preview_step.outputs.preview_url }}"