deploy-dev #594
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Notification To dev.phcode.dev | |
on: | |
repository_dispatch: | |
types: [deploy-dev] | |
jobs: | |
build-tasks: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Event triggered by | |
run: | | |
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 }} | |
- name: Checking Out https://github.com/phcode-dev/phoenix | |
uses: actions/checkout@v3 | |
with: | |
repository: phcode-dev/phoenix | |
ref: main | |
path: './phoenix' | |
fetch-depth: 0 | |
- name: Building phoenix release artifacts | |
working-directory: ./phoenix | |
run: | | |
npm ci | |
npm run release:dev | |
npm run _releaseWebCache | |
npm run zipTestFiles | |
cp -r dist distToDeploy/ | |
cp -r dist distToDeploy/src/ | |
cp -r test distToDeploy/test/ | |
shell: bash | |
- name: Copying release artifacts to public folder | |
run: | | |
mkdir -p ./public | |
cp -r ./phoenix/distToDeploy/. ./public | |
shell: bash | |
- name: Deploy Github Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public | |
cname: dev.phcode.dev |