Superadmin

This commit is contained in:
Ben Allfree
2023-12-13 23:25:11 -08:00
parent ed7d4aeb7d
commit 0527fd6972
85 changed files with 1791 additions and 35 deletions

View File

@@ -28,34 +28,20 @@ jobs:
ls
ls dist
- name: Get changed lander files
id: changed-lander-files
uses: tj-actions/changed-files@v40.1.0
with:
files: |
frontends/lander/**
- name: Expose git commit data
uses: rlespinasse/git-commit-data-action@v1.5.0
- name: Get changed dashboard files
# ===================
# DASHBOARD
# ===================
- name: DASHBOARD - Get changed dashboard files
id: changed-dashboard-files
uses: tj-actions/changed-files@v40.1.0
with:
files: |
frontends/dashboard/**
- name: Publish lander to Cloudflare Pages
uses: cloudflare/pages-action@v1.5.0
if: steps.changed-lander-files.outputs.any_changed == 'true'
id: lander_deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pockethost
directory: ./dist/lander
branch: ${{ github.head_ref || github.ref_name }}
wranglerVersion: '3'
- name: Publish dashboard to Cloudflare Pages
- name: DASHBOARD - Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1.5.0
if: steps.changed-dashboard-files.outputs.any_changed == 'true'
id: dashboard_deploy
@@ -68,10 +54,7 @@ jobs:
branch: ${{ github.head_ref || github.ref_name }}
wranglerVersion: '3'
- name: Expose git commit data
uses: rlespinasse/git-commit-data-action@v1.5.0
- name: Discord feature branch notification for dashboard
- name: DASHBOARD - Discord feature branch notification
if: github.ref_name != 'master' && steps.changed-dashboard-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
@@ -79,15 +62,7 @@ jobs:
with:
args: '**DASHBOARD PREVIEW** ${{ steps.dashboard_deploy.outputs.url }} was generated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}) with memo `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
- name: Discord feature branch notification for lander
if: github.ref_name != 'master' && steps.changed-lander-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '**LANDER PREVIEW** ${{ steps.lander_deploy.outputs.url }} was generated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}) with memo `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
- name: Discord live branch notification for dashboard
- name: DASHBOARD - Discord live branch notification
if: github.ref_name == 'master' && steps.changed-dashboard-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
@@ -95,10 +70,80 @@ jobs:
with:
args: '**DASHBOARD LIVE** https://app.pockethost.io ([permalink](${{ steps.dashboard_deploy.outputs.url }})) was updated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}): `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
- name: Discord live branch notification for lander
# ===================
# LANDER
# ===================
- name: LANDER - Get changed files
id: changed-lander-files
uses: tj-actions/changed-files@v40.1.0
with:
files: |
frontends/lander/**
- name: LANDER - Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1.5.0
if: steps.changed-lander-files.outputs.any_changed == 'true'
id: lander_deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pockethost-lander
directory: ./dist/lander
branch: ${{ github.head_ref || github.ref_name }}
wranglerVersion: '3'
- name: LANDER - Discord feature branch notification
if: github.ref_name != 'master' && steps.changed-lander-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '**LANDER PREVIEW** ${{ steps.lander_deploy.outputs.url }} was generated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}) with memo `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
- name: LANDER - Discord live branch notification
if: github.ref_name == 'master' && steps.changed-lander-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '**LANDER LIVE** https://pockethost.io ([permalink](${{ steps.lander_deploy.outputs.url }})) was updated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}): `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
# ===================
# SUPERADMIN
# ===================
- name: SUPERADMIN - Get changed files
id: changed-superadmin-files
uses: tj-actions/changed-files@v40.1.0
with:
files: |
frontends/superadmin/**
- name: SUPERADMIN - Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1.5.0
if: steps.changed-superadmin-files.outputs.any_changed == 'true'
id: superadmin_deploy
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: pockethost-superadmin
directory: ./dist/superadmin
branch: ${{ github.head_ref || github.ref_name }}
wranglerVersion: '3'
- name: SUPERADMIN - Discord feature branch notification
if: github.ref_name != 'master' && steps.changed-superadmin-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '**SUPERADMIN PREVIEW** ${{ steps.superadmin_deploy.outputs.url }} was generated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}) with memo `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'
- name: SUPERADMIN - Discord live branch notification
if: github.ref_name == 'master' && steps.changed-superadmin-files.outputs.any_changed == 'true'
env:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
uses: Ilshidur/action-discord@master
with:
args: '**SUPERADMIN LIVE** https://superadmin.pockethost.io ([permalink](${{ steps.superadmin_deploy.outputs.url }})) was updated by ${{ github.actor }} in [${{ env.GIT_COMMIT_SHORT_SHA }}](https://github.com/${{ github.repository}}/commit/${{ github.sha }}) on [${{ github.repository}}#${{ github.ref_name }}](https://github.com/${{ github.repository}}/tree/${{ github.ref_name }}): `${{ env.GIT_COMMIT_MESSAGE_SUBJECT }}`'