Skip to content

Dismissable banner updated #31

Dismissable banner updated

Dismissable banner updated #31

Workflow file for this run

name: "Deploy Static Files to Server"
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: FTP
steps:
- name: "Checking Out"
uses: actions/[email protected]
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: |
echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: "Caching yarn"
uses: actions/[email protected]
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: "Caching build"
uses: actions/[email protected]
with:
path: |
~/.npm
${{ github.workspace }}/.next/cache
# Generate a new cache whenever packages or source files change.
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: |
${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- name: Setting Up Node.js
uses: actions/[email protected]
with:
node-version: "18"
cache: "yarn"
- name: Installing dependencies
run: yarn
- name: Generating Static Files
run: yarn build
- name: Deploy to Server
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_SERVER }}
port: ${{ secrets.FTP_PORT }}
username: ${{ secrets.FTP_UNAME }}
password: ${{ secrets.FTP_PASS }}
protocol: ${{ secrets.FTP_PROTOCOL }}
local-dir: ./opensource/
server-dir: opensource/
security: strict