Skip to content

Commit

Permalink
Merge pull request #252 from lsst-sqre/tickets/DM-40673-ltd-deploy
Browse files Browse the repository at this point in the history
DM-40673: Configure the main branch to upload to www.lsst.io
  • Loading branch information
jonathansick authored Sep 11, 2023
2 parents bfbb2c3 + 158cd2b commit 98a20ad
Showing 1 changed file with 17 additions and 28 deletions.
45 changes: 17 additions & 28 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v2
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}

- uses: actions/cache@v2
uses: actions/setup-node@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm packages
run: npm install .
Expand All @@ -37,26 +27,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Read .nvmrc
id: node_version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
- uses: actions/checkout@v4

- name: Set up node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ steps.node_version.outputs.NODE_VERSION }}

- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
node-version-file: .nvmrc
cache: 'npm'

- name: Install npm packages
run: npm install .

- name: Build Gatsby site
run: npm run build

- name: Upload
if: github.ref == 'refs/heads/main'
uses: lsst-sqre/ltd-upload@v1
with:
project: 'www'
dir: 'public'
username: ${{ secrets.LTD_USERNAME }}
password: ${{ secrets.LTD_PASSWORD }}

0 comments on commit 98a20ad

Please sign in to comment.