Skip to content

Commit a072354

Browse files
committed
prod deploy github action scripts listening to event deploy-production
1 parent 4c4b8d7 commit a072354

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Deploy Notification To production phcode.dev
2+
3+
on:
4+
repository_dispatch:
5+
types: [deploy-production]
6+
7+
jobs:
8+
build-tasks:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Event triggered by
13+
run: |
14+
echo source: ${{github.event.client_payload.source}}, workflow: ${{github.event.client_payload.workflow}}, action_run_id: ${{github.event.client_payload.run_id}}, action_run_number: ${{github.event.client_payload.run_number}}, sha: ${{ github.event.client_payload.sha }}, github_ref: ${{ github.event.client_payload.ref }}
15+
- name: Checking Out https://github.com/phcode-dev/phoenix
16+
uses: actions/checkout@v2
17+
with:
18+
repository: phcode-dev/phoenix
19+
path: './phoenix'
20+
- name: Building phoenix release artifacts
21+
working-directory: ./phoenix
22+
run: |
23+
npm install
24+
npm run release
25+
shell: bash
26+
- name: Copying release artifacts to public folder
27+
run: |
28+
mkdir -p ./public
29+
cp -r ./phoenix/dist/. ./public
30+
shell: bash
31+
- name: Creating CNAME for github page custom domain activation
32+
run: |
33+
echo "phcode.dev" >> ./public/CNAME
34+
shell: bash
35+
- name: Deploy Github Pages
36+
uses: peaceiris/actions-gh-pages@v3
37+
if: github.ref == 'refs/heads/main'
38+
with:
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: ./public

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

0 commit comments

Comments
 (0)