Update Landing Page #240
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: Update Landing Page | |
on: | |
push: | |
branches: [ main ] # or any other branch | |
schedule: | |
- cron: '0 0 * * *' # Runs every day at midnight | |
workflow_dispatch: | |
jobs: | |
build-and-run: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' # Specify the Node.js version | |
- name: Install Dependencies | |
run: npm install | |
- name: Build TypeScript | |
run: npm run build # Make sure this script exists in package.json | |
- name: Run Script | |
run: node dist/index.js # Replace with the path to your compiled JS file | |
env: | |
MY_GITHUB_USERNAME: ${{ secrets.MY_GITHUB_USERNAME }} | |
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} | |
HTML_FILE_PATH: 'index.html' # Set the path to the HTML file |