Skip to content

Commit

Permalink
Adjusted buidl prcess
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSeccubus committed Oct 18, 2023
1 parent 13f7496 commit de81e3e
Showing 1 changed file with 14 additions and 30 deletions.
44 changes: 14 additions & 30 deletions .github/workflows/build_pages_native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,49 +10,33 @@ on:

jobs:
build_and_test:
runs-on: ubuntu-latest
runs-on: alpine-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# with:
# fetch-depth: 0
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- name: Next cache
uses: actions/cache@v3
with:
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node
path: |
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package.json') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package.json') }}
- name: Yarn
run: yarn
- name: Setup prerequisites
run: apk add hugo
- name: Build
run: yarn build
run: hugo
- name: "Fix security.txt"
run: mkdir out/.well-known && (cd out/.well-known && ln -s ../security.txt) && ls -al out/.well-known
run: mkdir public/.well-known && (cd public/.well-known && ln -s ../security.txt) && ls -al public/.well-known
- name: ".htaccess"
run: cp .htaccess out/
- name: Test HTML code
run: |
sudo apt-get update -y
sudo apt-get install python3-pip libcurl4 -y
pip3 install html5validator
sudo gem install --no-document html-proofer
./proof_html.sh || exit 0
# - name: Test HTML code
# run: |
# sudo apt-get update -y
# sudo apt-get install python3-pip libcurl4 -y
# pip3 install html5validator
# sudo gem install --no-document html-proofer
# ./proof_html.sh || exit 0
- name: rsync deploy
uses: burnett01/[email protected]
if: ${{ github.ref == 'refs/heads/main' }}
with:
switches: -avzr --delete
path: out/
path: public/
remote_path: htdocs/beta
remote_host: ${{ secrets.DEPLOY_HOST }}
remote_user: ${{ secrets.DEPLOY_USER }}
Expand All @@ -61,4 +45,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
folder: out/admin # The folder the action should deploy.
folder: /admin # The folder the action should deploy.

0 comments on commit de81e3e

Please sign in to comment.