Skip to content

Commit

Permalink
Merge pull request #141 from ASSETS-Conference/main
Browse files Browse the repository at this point in the history
build sync
  • Loading branch information
surajgoraya committed May 29, 2024
2 parents b5ba598 + 4596064 commit 383fac3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
build:
name: 🌇 Build
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_IN_GITHUB_ACTIONS: true
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -56,14 +54,6 @@ jobs:
with:
node-version: "18"
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v3
# with:
# Automatically inject basePath in your Next.js configuration file and disable
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized).
#
# You may remove this line if you want to manage the configuration yourself.
# static_site_generator: next
- name: Restore cache
uses: actions/cache@v3
with:
Expand All @@ -79,8 +69,9 @@ jobs:
- name: Build with Next.js
run: ${{ steps.detect-package-manager.outputs.runner }} next build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
uses: actions/upload-artifact@v4
with:
name: 'assets-prod-upload'
path: ./out

# Deployment job
Expand All @@ -94,6 +85,8 @@ jobs:
steps:
- name: 🌆 Grab Artifact
uses: actions/download-artifact@v4
with:
name: 'assets-prod-upload'
- name: Display structure of downloaded files
run: ls -R
- name: 📂 Upload Files
Expand All @@ -102,9 +95,7 @@ jobs:
server: ${{secrets.server}}
username: ${{secrets.username}}
password: ${{ secrets.password }}
dry-run: true
local-dir: ./out/
log-level: verbose
# dry-run: true
exclude: |
**/.git*
**/.git*/**
Expand All @@ -113,3 +104,5 @@ jobs:
**/cgi-bin/**
.ftpquota
.htaccess
- name: Display Changes
run: cat ./.ftp-deploy-sync-state.json
2 changes: 1 addition & 1 deletion next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* check for that.
*/

const _IN_GH_ACTIONS = process.env.GITHUB_ACTIONS || false;
const _IN_GH_ACTIONS = process.env.NEXT_PUBLIC_IN_GITHUB_ACTIONS || false;
console.log('GITHUB ACTION DETECTED?: ', _IN_GH_ACTIONS);
const _REPO = 'assets2024';

Expand Down

0 comments on commit 383fac3

Please sign in to comment.