Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
amalcaraz committed Mar 1, 2024
0 parents commit d0df1d1
Show file tree
Hide file tree
Showing 25 changed files with 25,819 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build Check

on:
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install and Build
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" FONTAWESOME_NPM_AUTH_TOKEN
npm ci
npm run build
40 changes: 40 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish

on:
push:
branches:
- main
- release/**

env:
IS_GH_PAGES: gh-pages

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- name: Install and Build
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" FONTAWESOME_NPM_AUTH_TOKEN
npm ci
npm run build
touch build/.nojekyll
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: build
46 changes: 46 additions & 0 deletions .github/workflows/push_on_ipfs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Push on IPFS

on:
push:
branches:
- release/**
tags:
- '*'

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18

- name: Install and Build
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" FONTAWESOME_NPM_AUTH_TOKEN
npm ci
npm run build
touch build/.nojekyll
- uses: actions/upload-artifact@v3
with:
name: front-aleph-website-cms
path: build/

- uses: actions/download-artifact@v3
with:
name: front-aleph-website-cms
path: build/

- name: Push on IPFS
run: |
find .
pip install 'aioipfs>=0.6.2'
python3 ./scripts/push_on_ipfs.py
export IPFS_CID=$(python3 ./scripts/push_on_ipfs.py)
echo $IPFS_CID
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vscode/settings.json
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# React Storyblok Boilerplate

This repository is a React [Storyblok](https://www.storyblok.com/) starter template used in following [5 min tutorial](https://www.storyblok.com/tp/headless-cms-react)

## Requirements

To use this project you have to have a Storyblok account. If you don't have one yet you can register at [Storyblok](https://app.storyblok.com/), it's free.

## How to get started

You can read how to use the React SDK [here](https://github.com/storyblok/storyblok-react)

### 1. Clone the repo

```sh
$ git clone https://github.com/storyblok/storyblok-react-boilerplate
```

### 2. Install the dependencies
```sh
$ npm install # or yarn
```

### 3. Add the Access Token

Create a new empty space and exchange the preview token of your new space with the `accessToken` in `index.js`.

### 4. Run your project

Set the preview domain in <strong>Storyblok</strong> to `http://localhost:3000/`

```sh
# to run in developer mode
$ npm run start # or yarn start
```

```sh
# to build the project
$ npm run build # or yarn build
```

## Resources

- [React Docs](https://reactjs.org/docs/getting-started.html)
- [Storyblok Tutorial](https://www.storyblok.com/tp/add-a-headless-cms-to-react-in-5-minutes )
Loading

0 comments on commit d0df1d1

Please sign in to comment.