Skip to content

Github Pages New Job Deploy #478

Github Pages New Job Deploy

Github Pages New Job Deploy #478

Workflow file for this run

name: Github Pages New Job Deploy
on:
workflow_dispatch:
inputs:
job_id:
description: 'job_id'
required: true
default: 'job name'
# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v2
- name: Install, build, and upload your site
uses: withastro/action@v0
with:
node-version: 18
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
- name: Create Telegram Notification
env:
GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }}
JOB_ID: ${{ inputs.job_id }}
run: |
echo "Job is done. Running post-job script..."
curl --request POST \
--url 'https://cucoders-backend.vercel.app/api/jobs/post-on-telegram' \
--header 'Content-Type: application/json' \
--data "{\"job\": \"${JOB_ID}\"}"