Skip to content

Deploy Masterclass stats #54

Deploy Masterclass stats

Deploy Masterclass stats #54

Workflow file for this run

# Workflow for deploying static content to GitHub Pages
name: Deploy Masterclass stats
on:
# Scheduled to run daily, after an hour: post repo stats are generated
schedule:
- cron: "50 0 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout github-repo-stats
uses: actions/checkout@v3
with:
ref: github-repo-stats
- name: Change directory and print it
run: |
cd sayantikabanik/Masterclass/latest-report
pwd
- name: List files in the current directory
run: ls -al
working-directory: sayantikabanik/Masterclass/latest-report
- name: Rename the file to index.html
run: |
mv report.html index.html
# because GHA pages job, only understands + seeks index keyword for a file name
working-directory: sayantikabanik/Masterclass/latest-report
- name: Upload HTML files to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: sayantikabanik/Masterclass/latest-report/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4