Skip to content

Commit

Permalink
Merge branch 'fix/rsync' into trunk
Browse files Browse the repository at this point in the history
  • Loading branch information
Ipstenu committed Sep 3, 2024
2 parents 77b98be + a1d8ed9 commit 64af479
Show file tree
Hide file tree
Showing 60 changed files with 281 additions and 341 deletions.
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
versioning-strategy: increase
13 changes: 7 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 'Preflight Checks'

on:
push:
branches-ignore: [ production ]

concurrency:
group: ${{ github.ref }}-ci
Expand All @@ -12,7 +13,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Do a git checkout including submodules
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: true
Expand Down Expand Up @@ -47,11 +48,11 @@ jobs:
- name: Make Resources Folder locally
run: mkdir resources

- name: Download resources from server
run: rsync -rlgoDzvc -i ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/ resources/
- name: Download Resources from Server
run: rsync -aCvt --delete ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/ resources/

- name: Build site
- name: Generate Resources
run: npm run build

- name: Deploy to Server
run: rsync -rlgoDzvc -i --delete resources/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/
- name: Push Resources to Server
run: rsync -aCvt --delete resources/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/
20 changes: 8 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
deploy-website:
runs-on: ubuntu-latest
steps:
- name: Do a git checkout including submodules
- name: Git Checkout
uses: actions/checkout@v4
with:
submodules: true
Expand Down Expand Up @@ -37,21 +37,17 @@ jobs:
- name: Install Dependencies
run: npm install && npm run mod:update

- name: Make Resources Folder locally
- name: Make Resources Folder Locally
run: mkdir resources

- name: Download resources from server
run: rsync -rlgoDzvc -i ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/ resources/

- name: Build site
- name: Build Website
run: npm run build

- name: Deploy to Server
uses: easingthemes/ssh-deploy@main
env:
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rlgoDzvc -i"
SOURCE: "public/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: "/home/jorjafox/jorjafox.net/"
- name: Delete Extra Folder
run: rm -rf public/404/

- name: Push Website to Server
run: rsync -aCvt --delete public/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.REMOTE_HOST }}/
50 changes: 50 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: 'Generate and deploy Staging'

on:
push:
branches: [ trunk ]

jobs:
deploy-website:
runs-on: ubuntu-latest
steps:
- name: Do a git checkout including submodules
uses: actions/checkout@v4
with:
submodules: true

- name: Install SSH Key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SERVER_SSH_KEY }}
known_hosts: unnecessary

- name: Adding Known Hosts
run: ssh-keyscan -H ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: 'latest'
extended: true

- name: Setup Node and Install
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'npm'

- name: Install Dependencies
run: npm install && npm run mod:update

- name: Make Resources Folder locally
run: mkdir resources

- name: Download resources from server
run: rsync -rlgoDzvc -i ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.HUGO_RESOURCES_URL }}/ resources/

- name: Build site
run: npm run build

- name: Push Website to Staging Server
run: rsync -aCvt --delete public/ ${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/home/${{ secrets.REMOTE_USER }}/${{ secrets.STAGING_SERVER }}/
39 changes: 24 additions & 15 deletions config/_default/menus.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,68 +4,77 @@ main:
pageRef: /
weight: 10
- name: Site News
pageRef: /blog
pageRef: /blog/
weight: 20
- name: About
pageRef: /about
pageRef: /about/
weight: 20
- name: FAQs
pageRef: /faq
pageRef: /faq/
weight: 20
- name: Resources
pageRef: /library
weight: 30
- parent: Resources
name: Library
url: /library
pageRef: /library/
weight: 31
- parent: Resources
name: Filmography
url: /library/filmography
pageRef: /library/filmography/
weight: 32
- parent: Resources
name: News Articles
url: /library/news
pageRef: /library/news/
weight: 33
- parent: Resources
name: Advocacy
url: /library/advocacy
pageRef: /library/advocacy/
weight: 34
- parent: Resources
name: Transcripts
url: /library/transcript
pageRef: /library/transcript/
weight: 35

footer:
- name: Links
weight: 10
- name: Privacy Policy
parent: Links
pageRef: /tos/privacy
pre: "fas fa-lock"
pageRef: /tos/privacy/
weight: 10
- name: Terms of Service
parent: Links
pageRef: /tos/terms
pre: "fas fa-file-contract"
pageRef: /tos/
weight: 20
- name: Copyright
parent: Links
pageRef: /tos/copyright
pre: "fas fa-copyright"
pageRef: /tos/copyright/
weight: 30
- name: RSS Feed
- name: Contribute
parent: Links
pageRef: https://jorjafox.net/feed.xml
pre: "fab fa-github"
url: https://github.com/JorjaFox/website/
weight: 40
- name: RSS Feed
parent: Links
pre: "fas fa-rss"
url: https://jorjafox.net/feed.xml
weight: 50

social:
- name: Official Website
url: https://jorjafox.com/
pre: "fas house-chimney-user"
weight: 10
- name: X/Twitter
url: https://twitter.com/jorjafoxofficia
url: https://twitter.com/jorjafoxofficia/
pre: "fab x-twitter"
weight: 20
- name: Facebook
url: https://www.facebook.com/jorjafoxofficial
url: https://www.facebook.com/jorjafoxofficial/
pre: "fab facebook"
weight: 30
Loading

0 comments on commit 64af479

Please sign in to comment.