🌸 Tila Uptimer Job! #206
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: 🌸 Tila Uptimer Job! | |
permissions: write-all | |
on: | |
push: | |
branches: ["main"] | |
# CONFIGURE INTERVAL OF YOUR CHOICE | |
schedule: | |
- cron: "* * * * *" | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BROWSERLESS_SERVER_DOMAIN: ${{ secrets.BROWSERLESS_SERVER_DOMAIN }} | |
BROWSERLESS_TOKEN: 6R0W53R135510 | |
WEBSITE_DOMAIN: example.com | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Deno | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: vx.x.x | |
- name: Fetch data using browserless! | |
run: deno run -A scripts/get_data.js | |
- name: Format code | |
run: deno fmt . | |
- name: Commit and push files | |
uses: EndBug/add-and-commit@v9 | |
with: | |
committer_name: "Tila Uptime Dashboard" | |
message: "🌸 Updated Website Status!" | |
add: "." | |
deploy: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Setup Deno environment | |
uses: denoland/setup-deno@v1 | |
with: | |
deno-version: v1.x | |
- name: Build site | |
run: deno task build | |
- name: Setup Pages | |
uses: actions/configure-pages@v5.0.0 | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: '_site' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |