Skip to content

Commit

Permalink
Moving to cloudflare pages for hosting
Browse files Browse the repository at this point in the history
JonathanGiles committed Aug 19, 2024
1 parent 1968f01 commit c9dc97f
Showing 6 changed files with 43 additions and 431 deletions.
Original file line number Diff line number Diff line change
@@ -3,9 +3,9 @@
name: CI
on:
workflow_dispatch:
push:
branches:
- master
# push:
# branches:
# - master

jobs:
build:
39 changes: 39 additions & 0 deletions .github/workflows/cloudflare-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
workflow_dispatch:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
name: Deploy to Cloudflare Pages
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Build with Maven and generate static site
run: mvn --batch-mode package exec:java

- name: Publish
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'jonathangiles-net'
directory: 'target/output'
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -3,4 +3,4 @@
output
target
.DS_Store
.idea
.idea
19 changes: 0 additions & 19 deletions .mvn/wrapper/maven-wrapper.properties

This file was deleted.

259 changes: 0 additions & 259 deletions mvnw

This file was deleted.

Loading

0 comments on commit c9dc97f

Please sign in to comment.