Skip to content

Commit

Permalink
Merge pull request #9 from umarcor/umarcor/ci/update
Browse files Browse the repository at this point in the history
ci: update
  • Loading branch information
kgugala authored May 23, 2022
2 parents a37b06f + 156a789 commit 9b9bdd7
Show file tree
Hide file tree
Showing 4 changed files with 11,038 additions and 31 deletions.
Original file line number Diff line number Diff line change
@@ -1,47 +1,61 @@
name: build-and-deploy
name: Pipeline

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '0 0 * * 5'
workflow_dispatch:

jobs:
build:


Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2

- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '10'
- name: Clone and Build
node-version: '14'
cache: 'npm'

- name: Install dependencies
run: |
npm install
npm ci
npm install -g gulp-cli
gulp build
- uses: actions/upload-artifact@v2
- name: Build
run: gulp build

- uses: actions/upload-artifact@v3
with:
name: website-build
path: |
build
deploy:
path: build


Deploy:
runs-on: ubuntu-latest
needs: [ build ]
needs: Build
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v2

- uses: actions/download-artifact@v3
with:
name: website-build
path: /tmp/website-build
- uses: actions/checkout@v2

- uses: actions/checkout@v3

- name: Deploy website
if: github.event_name == 'push'
run: |
export ROOT=$(pwd)
ROOT_CONFIG=$(pwd)/.git/config
cd /tmp/website-build/
touch .nojekyll
echo 'f4pga.org' > CNAME
git init
cp $ROOT/.git/config ./.git/config
cp "$ROOT_CONFIG" ./.git/config
git add .
git config --local user.email "push@gha"
git config --local user.name "GHA"
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/build/
/node_modules/
14 changes: 3 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,9 @@ Sources of the website for the [F4PGA](https://github.com/chipsalliance/f4pga) p

# Development

## Dependencies

Requires `node.js`. Run `npm install` to install dependencies.

## Live reload

Use `gulp`. Run `gulp watch` to start a live server.

## Build

Run `gulp build` to build into the `build` folder. Static files can be served from there.
* Requires `node.js`. Run `npm install` to install dependencies.
* Run `gulp watch` to start a live server.
* Run `gulp build` to build into the `build` folder. Static files can be served from there.

# License

Expand Down
Loading

0 comments on commit 9b9bdd7

Please sign in to comment.