mirror of
https://github.com/Ellpeck/TinyLifeWeb.git
synced 2024-11-22 19:28:35 +01:00
added surge preview to actions
This commit is contained in:
parent
6f9fa2edb9
commit
dc9ad7939a
1 changed files with 22 additions and 1 deletions
23
.github/workflows/build.yml
vendored
23
.github/workflows/build.yml
vendored
|
@ -1,4 +1,7 @@
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened, closed]
|
||||||
|
push:
|
||||||
jobs:
|
jobs:
|
||||||
web:
|
web:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -18,6 +21,15 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cd web && bundle exec jekyll build
|
run: cd web && bundle exec jekyll build
|
||||||
|
|
||||||
|
- name: Preview
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: afc163/surge-preview@v1
|
||||||
|
with:
|
||||||
|
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||||
|
dist: web/_site
|
||||||
|
teardown: true
|
||||||
|
build: echo # see https://github.com/afc163/surge-preview/issues/231
|
||||||
|
|
||||||
# this is a beautiful way to deploy a website and i will not take any criticism
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
@ -41,6 +53,15 @@ jobs:
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cd docs && dotnet tool restore && dotnet docfx
|
run: cd docs && dotnet tool restore && dotnet docfx
|
||||||
|
|
||||||
|
- name: Preview
|
||||||
|
if: github.event_name == 'pull_request'
|
||||||
|
uses: afc163/surge-preview@v1
|
||||||
|
with:
|
||||||
|
surge_token: ${{ secrets.SURGE_TOKEN }}
|
||||||
|
dist: docs/_site
|
||||||
|
teardown: true
|
||||||
|
build: echo # see https://github.com/afc163/surge-preview/issues/231
|
||||||
|
|
||||||
# this is a beautiful way to deploy a website and i will not take any criticism
|
# this is a beautiful way to deploy a website and i will not take any criticism
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
if: github.event_name == 'push' && github.ref_name == 'main'
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
|
Loading…
Reference in a new issue