8000 Docker helper to deploy container / CI test and doc by damien-mathieu1 · Pull Request #1 · Nephelios/nephelios · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Docker helper to deploy container / CI test and doc #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
## PR Type

What kind of change does this PR introduce?
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no API changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[ ] Other

## What's new?
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no API changes)

-
## Description

## Screenshots
Briefly describe the changes proposed in this PR.

N/A
## Checklist

Before requesting a review, please ensure:

- [ ] Tests have been added/updated
- [ ] Code follows our coding standards
- [ ] Relevant documentation has been updated

## Screenshots (optional)

Attach screenshots or images to illustrate changes.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Rust CI

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Install dependencies
run: |
rustup component add clippy
rustup component add rustfmt

- name: Run tests
run: |
cargo test --verbose

- name: Build documentation
if: success()
run: |
cargo doc --no-deps --document-private-items

- name: Create redirect index.html
if: success()
run: |
echo '<meta http-equiv="refresh" content="0; url=nephelios/index.html">' > target/doc/index.html

deploy:
# Only deploy documentation after the build job passes and a push to main occurs
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest

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

- name: Deploy documentation to GitHub Pages
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git fetch origin
git checkout gh-pages || git checkout --orphan gh-pages
git reset --hard
cp -r target/doc/* ./
git add .
git commit -m "Update documentation"
git push --force "https://${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git" gh-pages
Loading
Loading
0