Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
version: 2

updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
time: "04:00"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
time: "04:00"
open-pull-requests-limit: 10
48 changes: 48 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Build and deploy"

on:
- "push"
- "workflow_dispatch"

jobs:
build:
name: "Build 🔨"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-node@v4"
with:
cache: "npm"

- run: "npm install"
- run: "npm run build"
- uses: "actions/upload-artifact@v4"
with:
name: "dist"
path: "dist"

deploy-staging:
name: "Deploy 🚜️"
runs-on: "ubuntu-latest"
if: "startsWith(github.ref, 'refs/tags/')"
needs:
- "build"
steps:
- name: "update apt cache"
run: "sudo apt-get update"
- name: "install rclone"
run: "sudo apt-get -y install rclone"
- uses: "actions/download-artifact@v4"
with:
name: "dist"
path: "dist"
- name: "obfuscate password for rclone"
run: "echo \"RCLONE_FTP_PASS=$(echo ${{ secrets.HETZNER_FTP_PASS}} | rclone obscure -)\" >> $GITHUB_ENV"
- name: "sync webspace"
run: "rclone sync dist :ftp:"
env:
RCLONE_FTP_HOST: "${{ vars.HETZNER_FTP_HOST }}"
RCLONE_FTP_USER: "${{ secrets.HETZNER_FTP_USER }}"
RCLONE_FTP_EXPLICIT_TLS: "true"
RCLONE_VERBOSE: 1

25 changes: 25 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Dependabot Pull Request"

on: "pull_request_target"

permissions:
pull-requests: "write"
contents: "write"

jobs:
dependabot:
name: "Dependabot pull request"
runs-on: "ubuntu-latest"
if: "${{ github.actor == 'dependabot[bot]' }}"
steps:
- name: "Fetch Dependabot metadata"
id: "metadata"
uses: "dependabot/fetch-metadata@v2.2.0"
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Enable auto-merge for Dependabot pull requests"
if: "${{ steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch' }}"
run: "gh pr merge --auto --squash \"${PR_URL}\""
env:
PR_URL: "${{ github.event.pull_request.html_url }}"
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
node_modules/
10 changes: 10 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
</head>
<body>
<script src="https://p.trellocdn.com/power-up.min.js"></script>
<script type="module" src="/src/trektor.js"></script>
</body>
</html>
Loading