Skip to content

Commit 18ca907

Browse files
committed
start of CI/CD yml tunnel
1 parent 8d75474 commit 18ca907

22 files changed

+74
-3327
lines changed

.dockerignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
.git
1+
.git*

.github/workflows/cicd.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
on: [push, workflow_dispatch]
2+
jobs:
3+
cicd:
4+
# https://github.com/internetarchive/cicd
5+
uses: internetarchive/cicd/.github/workflows/cicd.yml@main
6+
with:
7+
NOMAD_VAR_HOSTNAMES: '["nomad","nomad.archive.org"]'
8+
NOMAD_VAR_MEMORY: 100 # xxx
9+
secrets:
10+
NOMAD_TOKEN_EXT: ${{ secrets.NOMAD_TOKEN_EXT }}

.github/workflows/pages.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# https://docs.github.com/en/actions/using-workflows/reusing-workflows
2+
3+
name: copy repo & deploy to GitHub Pages
4+
5+
on:
6+
workflow_call:
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-24.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
with:
31+
lfs: true
32+
fetch-depth: 0
33+
- name: Setup Pages
34+
uses: actions/configure-pages@v5
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
with:
38+
path: ./
39+
40+
# Deploy to GitHub Pages
41+
deploy:
42+
environment:
43+
name: github-pages
44+
url: ${{ steps.deployment.outputs.page_url }}
45+
runs-on: ubuntu-latest
46+
needs: build
47+
steps:
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

.gitlab-ci.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

Caddyfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
admin off
3+
}
4+
5+
# We answer all requests with the contents of this file:
6+
# https://raw.githubusercontent.com/internetarchive/nomad/refs/heads/master/.gitlab-ci.yml
7+
8+
:5000 {
9+
rewrite * /internetarchive/nomad/refs/heads/master/.gitlab-ci.yml
10+
reverse_proxy https://raw.githubusercontent.com
11+
}

Dockerfile

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
FROM denoland/deno:alpine
1+
FROM caddy:alpine
22

3-
# add `nomad`
4-
RUN mkdir -m777 /usr/local/sbin && \
5-
cd /usr/local/sbin && \
6-
wget -qO nomad.zip https://releases.hashicorp.com/nomad/1.7.6/nomad_1.7.6_linux_amd64.zip && \
7-
unzip nomad.zip && \
8-
rm nomad.zip && \
9-
chmod 777 nomad && \
10-
# podman for build.sh
11-
apk add bash zsh jq podman && \
12-
# using podman not docker
13-
ln -s /usr/bin/podman /usr/bin/docker
14-
15-
COPY build.sh deploy.sh /
16-
17-
# revisit this:
18-
# USER deno
19-
20-
# NOTE: `nomad` binary needed for other repositories using us for CI/CD - but drop from _our_ webapp.
21-
CMD rm /usr/local/sbin/nomad /usr/bin/podman && su deno -c 'deno eval "import { serve } from \"https://deno.land/std/http/server.ts\"; serve(() => new Response(\"hai\"), { port: 5000 })"'
3+
COPY Caddyfile /etc/caddy/

0 commit comments

Comments
 (0)