Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Commit

Permalink
ci: converted over to netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
cecilia-sanare committed Nov 11, 2022
1 parent 9aa5e4a commit 76741bd
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 62 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,46 +174,3 @@ jobs:
destination_container_repo: rainbowcafe/silvy
provider: dockerhub
readme_file: 'README.md'

deploy-live:
name: Deploy (Vercel)
runs-on: ubuntu-latest
needs: semantic
if: needs.semantic.outputs.published == 'true'
steps:
- uses: actions/checkout@v2
- name: Cache Node Modules
id: cache-npm
uses: actions/cache@v3
with:
path: node_modules/
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Cache NextJS
id: cache-nextjs
uses: actions/cache@v3
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('**.[jt]s', '**.[jt]sx') }}
# If source files changed but packages didn't, rebuild from a prior cache.
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-
- run: npx vercel pull --environment=production --yes --token=${VERCEL_TOKEN}
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- run: npx vercel build --prod
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
- uses: amondnet/vercel-action@v20
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
scope: rainbow-cafe
vercel-args: '--prod --prebuilt'
vercel-org-id: ${{ secrets.VERCEL_ORG_ID}}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID}}
alias-domains: silvy.rains.cafe
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ yarn-error.log*

# local env files
.env*
.vercel
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
[_**Want to Contribute?**_](/CONTRIBUTING.md)
[![Vercel][vercel-image]][vercel-url]
[![Deploys by Netlify][netlify-image]][netlify-url]
[vercel-image]: https://user-images.githubusercontent.com/9692284/192920193-fc967232-e0ba-425f-af63-c8eff3fe3216.png
[vercel-url]: https://vercel.com/?utm_source=rainbow-cafe&utm_campaign=oss
[netlify-image]: https://www.netlify.com/v3/img/components/netlify-color-accent.svg
[netlify-url]: https://www.netlify.com
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
"build": "next build",
"lint": "eslint src/**/*.tsx",
"test": "jest --coverage=false",
"test:coverage": "jest --coverage",
"pull": "vercel env pull .env.local -y"
"test:coverage": "jest --coverage"
},
"dependencies": {
"@emotion/react": "^11.10.5",
Expand Down Expand Up @@ -49,7 +48,6 @@
"jest-environment-jsdom": "^29.3.1",
"sass": "^1.56.1",
"ts-jest": "^29.0.3",
"typescript": "^4.1.2",
"vercel": "^28.4.17"
"typescript": "^4.1.2"
}
}
6 changes: 6 additions & 0 deletions public/netlify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 0 additions & 3 deletions public/vercel-logo.svg

This file was deleted.

5 changes: 2 additions & 3 deletions src/components/universal/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,19 @@ import { Direction } from '../../constants/components';
import { IconButton } from '../common/Button/IconButton';
import { BsGithub } from 'react-icons/bs';
import { Button } from '../common/Button/Button';
import Link from 'next/link';

export function Footer() {
return (
<Content className={styles.footer} direction={Direction.HORIZONTAL} main>
<div/>
<Button
as='a'
href="https://vercel.com/?utm_source=rainbow-cafe&utm_campaign=oss"
href="https://www.netlify.com"
target="_blank"
rel="noopener noreferrer"
>
Powered by
<Image src="/vercel-logo.svg" height={20} width={88} alt="Vercel" className='icon' />
<Image src="/netlify.svg" height={20} width={88} alt="Netlify" className='icon' />
</Button>
<div className={styles.externalLinks}>
<IconButton
Expand Down
6 changes: 1 addition & 5 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@ import Layout from '../components/universal/Layout';
import { COLORS } from '../constants/themes';

export default function SilvyApp({ Component, pageProps: { session, ...pageProps } }) {
const router = useRouter();

return (
<SessionProvider session={session}>
<Layout>
{router.isReady && (
<Component {...pageProps} />
)}
<Component {...pageProps} />

<style jsx global>{`
@font-face {
Expand Down

0 comments on commit 76741bd

Please sign in to comment.