-
Notifications
You must be signed in to change notification settings - Fork 2
74 lines (59 loc) · 2.02 KB
/
deploy_preview.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: 🚀 Deploy IG Site Preview
on:
pull_request:
types: [opened, reopened, edited, synchronize]
jobs:
publish:
name: 📝 Preview Implementation Guide
runs-on: ubuntu-20.04
steps:
- name: 👩💻 Checkout code
uses: actions/checkout@v3
- name: 🛠 Set up OpenJDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: 🛠 Set up Jekyll
run: |
sudo apt-get update
sudo apt-get -y install ruby-full build-essential zlib1g-dev
sudo gem install jekyll bundler
- name: 🛠 Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 12
- name: 🛠 Install SUSHI and add FSH definitions
run: |
npm install -g fsh-sushi
sushi .
- name: ⬆️ Update IG publisher
run: |
sudo apt-get -y install iputils-ping
chmod +x ./_updatePublisher.sh
./_updatePublisher.sh -y
- name: 🚦 Validate IG
run: |
chmod +x ./_genonce.sh
./_genonce.sh
- name: 🚀 Deploy to Netlify
uses: nwtgck/[email protected]
id: netlify
with:
publish-dir: './output'
deploy-message: "🚀 Deploy from GitHub Actions"
github-token: ${{ secrets.GITHUB_TOKEN }}
alias: deploy-preview-${{ github.event.number }}
fails-without-credentials: true
enable-pull-request-comment: false
enable-commit-comment: false
enable-commit-status: false
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
- name: 🏷 PR Deploy Preview Comment
uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
### :rocket: IG Site Preview Deployed
Latest commit: ${{ github.event.pull_request.head.sha }}
[View deployment](${{ steps.netlify.outputs.deploy-url }})